﻿using Neural;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace NNTest
{
    
    
    /// <summary>
    ///This is a test class for NeuronTest and is intended
    ///to contain all NeuronTest Unit Tests
    ///</summary>
    [TestClass()]
    public class NeuronTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Weights
        ///</summary>
        [TestMethod()]
        public void WeightsTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double[] expected = null; // TODO: Initialize to an appropriate value
            double[] actual;
            target.Weights = expected;
            actual = target.Weights;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for OutputValue
        ///</summary>
        [TestMethod()]
        public void OutputValueTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double actual;
            actual = target.OutputValue;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Name
        ///</summary>
        [TestMethod()]
        public void NameTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            target.Name = expected;
            actual = target.Name;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Inputs
        ///</summary>
        [TestMethod()]
        public void InputsTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double[] actual;
            actual = target.Inputs;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ActivationFunction
        ///</summary>
        [TestMethod()]
        public void ActivationFunctionTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            ActivationFunction expected = null; // TODO: Initialize to an appropriate value
            ActivationFunction actual;
            target.ActivationFunction = expected;
            actual = target.ActivationFunction;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for SetNeuralTrainer
        ///</summary>
        [TestMethod()]
        public void SetNeuralTrainerTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            NeuronTraining trainer = null; // TODO: Initialize to an appropriate value
            target.SetNeuralTrainer(trainer);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for SetInput
        ///</summary>
        [TestMethod()]
        public void SetInputTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double val = 0F; // TODO: Initialize to an appropriate value
            target.SetInput(val);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for SetError
        ///</summary>
        [TestMethod()]
        public void SetErrorTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double actual = 0F; // TODO: Initialize to an appropriate value
            double expected = 0F; // TODO: Initialize to an appropriate value
            target.SetError(actual, expected);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for ReceiveSignal
        ///</summary>
        [TestMethod()]
        public void ReceiveSignalTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            Axon firingAxon = null; // TODO: Initialize to an appropriate value
            double val = 0F; // TODO: Initialize to an appropriate value
            target.ReceiveSignal(firingAxon, val);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for ReceiveFeedback
        ///</summary>
        [TestMethod()]
        public void ReceiveFeedbackTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            double val = 0F; // TODO: Initialize to an appropriate value
            Axon source = null; // TODO: Initialize to an appropriate value
            target.ReceiveFeedback(val, source);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetTrainer
        ///</summary>
        [TestMethod()]
        public void GetTrainerTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            NeuronTraining expected = null; // TODO: Initialize to an appropriate value
            NeuronTraining actual;
            actual = target.GetTrainer();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for FireNeuron
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Neural.NET.dll")]
        public void FireNeuronTest()
        {
            Neuron_Accessor target = new Neuron_Accessor(); // TODO: Initialize to an appropriate value
            target.FireNeuron();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for DotProduct
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Neural.NET.dll")]
        public void DotProductTest()
        {
            Neuron_Accessor target = new Neuron_Accessor(); // TODO: Initialize to an appropriate value
            double[] p1 = {1.0, 2.0, 3.0}; // TODO: Initialize to an appropriate value
            double[] p2 = {1.0, 1.0, 1.0}; // TODO: Initialize to an appropriate value
            double expected = 6.0; // TODO: Initialize to an appropriate value
            double actual;
            actual = target.DotProduct(p1, p2);
            Assert.AreEqual(expected, actual, 0.00000001);
        }

        /// <summary>
        ///A test for AdjustWeights
        ///</summary>
        [TestMethod()]
        public void AdjustWeightsTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            target.AdjustWeights();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddOutputAxon
        ///</summary>
        [TestMethod()]
        public void AddOutputAxonTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            Axon axon = null; // TODO: Initialize to an appropriate value
            target.AddOutputAxon(axon);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddInputAxon
        ///</summary>
        [TestMethod()]
        public void AddInputAxonTest()
        {
            Neuron target = new Neuron(); // TODO: Initialize to an appropriate value
            Axon axon = null; // TODO: Initialize to an appropriate value
            target.AddInputAxon(axon);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Neuron Constructor
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Neural.NET.dll")]
        public void NeuronConstructorTest1()
        {
            Neuron_Accessor target = new Neuron_Accessor();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Neuron Constructor
        ///</summary>
        [TestMethod()]
        public void NeuronConstructorTest()
        {
            string name = string.Empty; // TODO: Initialize to an appropriate value
            Neuron target = new Neuron(name);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
